var e = require("../../../../@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.default = void 0;

var r = e(require("../../../../@babel/runtime/helpers/classCallCheck")), t = e(require("../../../../@babel/runtime/helpers/createClass")), s = function() {
    function e() {
        (0, r.default)(this, e), this.__init();
    }
    return (0, t.default)(e, [ {
        key: "__init",
        value: function() {
            this.handlers = [];
        }
    }, {
        key: "use",
        value: function(e) {
            return this.handlers.push({
                request: e.request,
                requestError: e.requestError,
                response: e.response,
                responseError: e.responseError
            }), this.handlers.length - 1;
        }
    }, {
        key: "eject",
        value: function(e) {
            this.handlers[e] && (this.handlers[e] = null);
        }
    }, {
        key: "forEach",
        value: function(e) {
            this.handlers.forEach(function(r) {
                null !== r && e(r);
            });
        }
    } ]), e;
}();

exports.default = s;